import request from '@/utils/request'
import api from './config'
const host = api.apiHost

// 文件上传获取签名 minio
export function getSign(data) {
  return request({
    url: host + '/file/uploadUrl',
    method: 'post',
    data
  })
}

// 上传 minio
export function uploadFile(url, data) {
  return request({
    url,
    method: 'post',
    data,
    headers: { 'Content-Type': 'multipart/form-data' }
  })
}
